# Plot de la gráfica para la velocidad de conexión
set time
set title "Speed Statistics Download"
set xdata time
set timefmt "%Y-%m-%d %H:%M:%S"
set format x "%d/%m - %H:%M"
set ylabel "Speed Download"
set terminal jpeg enhanced font 'Verdana,8'
set output "/var/www/linap/images/testvelocidad.jpg"
set xlabel "Date/Time"
set yrange [0:25]
set grid front
set xtics axis
set ytics axis
set style data lines
set style fill solid 1.0
set xtics nomirror rotate by -35 font ",3"
set ytics nomirror font ",3"
plot "<(tail -100 /var/www/linap/datos/testvelocidad.datos)" using 1:4 with lines notitle 

# Plot para la grafica de la velocidad de cada URL
#set time
#set boxwidth 0.5 absolute
#set style fill solid 0.25 border
#set samples 25,25
#set title "URL max speed download"
#set yrange [ 0.00000 : 120.000 ] noreverse nowriteback
#set terminal jpeg enhanced font 'Verdana,8'
#set output "/var/www/linap/images/testvelocidadURL.jpg"
#set ylabel "Speed Download"
#set xlabel "URL"
#set yrange [0:25]
#set grid front
#set xtics axis
#set ytics axis
## update
## 8/05/2014
## -nrk1,2 nos es lo mismo a -nrk1 -nrk2, así contemplamos que ordene y tome como numérico todos los campos
#plot "<(sort -nrk1 -nrk2 /var/www/linap/datos/testvelocidad.URLs | uniq -w2)" using 1:2 with lines notitle

